Skip to content

Named playlists and compilations - #999

Open
vcccdells wants to merge 1 commit into
whyboris:mainfrom
vcccdells:pr/4-playlists
Open

vcccdells wants to merge 1 commit into
whyboris:mainfrom
vcccdells:pr/4-playlists

Conversation

@vcccdells

Copy link
Copy Markdown

Branch: pr/4-playlists → main · 1 commit · 24 files, +2816 / −9

Adds any number of named playlists, managed from a sidebar panel (Settings → "Show playlists"):

  • create, rename, duplicate, reorder (drag) and delete playlists;
  • add videos from the right-click menu ("Add to playlist…"), the thumbnail's playlist icon (last used playlist),
    by dragging thumbnails onto a playlist, or "Add N selected";
  • open a playlist to see its entries in order: drag to reorder, Delete to remove, Ctrl+A, move/copy entries to
    another playlist, open the containing folder; Play / Shuffle play hand the list to the preferred external
    player as .m3u8;
  • a compilation is a playlist whose entries can carry a start/end time (a highlight). This PR stores and
    plays those ranges externally (#EXTVLCOPT start/stop); marking them comes with the built-in player (PR 5/6).

Storage: a sidecar <hub>.playlists.json next to the hub (versioned, atomic write + .bak), so the .vha2
format is untouched and a hub without the sidecar behaves exactly as before. Entries reference videos by hash and
re-link by path after a move + rescan. The legacy "playlist" timestamp field is migrated into a playlist named
"Playlist" the first time a hub is opened. An open playlist overlays the gallery; "All videos", the gallery
button and Esc always lead back.

New English strings only (other languages fall back to English).

Testing: used daily on a ~4,000-video hub; create/add/reorder/move/delete, legacy migration, sidecar recovery
from .bak, and an isolated run against an existing sidecar.

🤖 Generated with Claude Code

The existing "playlist" was a single, unnamed list that could only be built
by filtering the gallery. This adds any number of named playlists, managed
from a sidebar panel (Settings > "Show playlists"):

- Create, rename, duplicate, reorder (drag) and delete playlists.
- Add videos from the right-click menu ("Add to playlist..."), from the
  thumbnail's playlist icon (adds to the last used playlist), or by dragging
  thumbnails onto a playlist; "Add N selected" adds a whole selection.
- Open a playlist to see its entries in order: drag to reorder, Delete to
  remove, Ctrl+A to select, move or copy entries to another playlist, open
  the containing folder. "Play" / "Shuffle play" hand the list to the
  preferred external player as an .m3u8.
- A "compilation" is a playlist whose entries can carry a start/end time
  (a highlight). This commit stores and plays those ranges externally
  (#EXTVLCOPT start/stop times); marking them comes with the built-in player.

Storage: playlists live in a sidecar file next to the hub
(`<hub>.playlists.json`, versioned, written atomically with a .bak), so the
.vha2 format is untouched and a hub without the sidecar behaves exactly as
before. Entries reference videos by hash and re-link by path when a file
was moved and rescanned. The legacy "playlist" timestamp field is migrated
into a playlist named "Playlist" the first time the hub is opened.

An open playlist overlays the gallery; "All videos", the gallery button and
Esc always lead back, so a new or empty playlist can never trap the view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant